package com.iplant.pdm.service.po.fpc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 产品分组
 *
 * @author YouWang·Peng
 * 2023-7-20 09:51:11
 */
@DBBasePO(TableName = "fpc_productgroup", AutoCreateTable = true, CheckName = {"Code", "Name"}, Schemas =
        DBSchemas.PDM)
public class FPCProductGroup extends BasePO implements Serializable {
    /**
     * 物料组信息
     */
    private static final long serialVersionUID = 1L;

    public FPCProductGroup() {
    }

    @DBField
    @DBCondition
    public int ParentGroupID;// 上级组ID
    @DBJoin(name = "Name", tableName = "fpc_productgroup", tableAsName = "t1", Schemas = DBSchemas.PDM,
            MainTableField = "ParentGroupID")
    @DBCondition
    public String ParentGroupName;// 上级组名称
    @DBJoin(name = "Code", tableName = "fpc_productgroup", tableAsName = "t1", Schemas = DBSchemas.PDM,
            MainTableField = "ParentGroupID")
    @DBCondition
    public String ParentGroupCode;

    public int ItemCount = 0;
    public int ProductCount = 0;
    /**
     * 上级组全称
     */
    @DBField
    @DBCondition
    public String GroupFullName;


    @JsonProperty("ParentGroupID")
    public int getParentGroupID() {
        return ParentGroupID;
    }

    public void setParentGroupID(int parentGroupID) {
        ParentGroupID = parentGroupID;
    }

    @JsonProperty("ParentGroupName")
    public String getParentGroupName() {
        return ParentGroupName;
    }

    public void setParentGroupName(String parentGroupName) {
        ParentGroupName = parentGroupName;
    }

    @JsonProperty("ParentGroupCode")
    public String getParentGroupCode() {
        return ParentGroupCode;
    }

    public void setParentGroupCode(String parentGroupCode) {
        ParentGroupCode = parentGroupCode;
    }

    @JsonProperty("GroupFullName")
    public String getGroupFullName() {
        return GroupFullName;
    }

    public void setGroupFullName(String groupFullName) {
        GroupFullName = groupFullName;
    }

    @JsonProperty("ItemCount")
    public int getItemCount() {
        return ItemCount;
    }

    public void setItemCount(int itemCount) {
        ItemCount = itemCount;
    }

    @JsonProperty("ProductCount")
    public int getProductCount() {
        return ProductCount;
    }

    public void setProductCount(int productCount) {
        ProductCount = productCount;
    }
}
